package com.zhx.real.security.handler;

import org.springframework.security.access.AccessDeniedException;

import javax.servlet.ServletException;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import java.io.IOException;

/**
 * describe: 客户端无权限做某块操作的时候弹出的提示  重写spring security
 *
 * @author zhanghaixuan
 * @date 2018/08/21
 **/
public interface CuestomAccessDeniedHandler {
	/**
	 * 拦截当前用户操作的后客户端自定义消息接口
	 * @param request request
	 * @param response response
	 * @param accessDeniedException 拦截的错误消息
	 * @throws IOException io异常
	 * @throws ServletException servlet异常
	 */
    void handle(HttpServletRequest request, HttpServletResponse response, AccessDeniedException accessDeniedException) throws IOException, ServletException;
}
